.extern isr_common

#define ISR_NOERR(num) \
    isr##num: ;\
	cli   ;\
        jmp isr_common ;\
	sti	       ;\
    .globl isr##num


#define ISR(num) \
    isr##num: ;\
	cli   ;\
        jmp isr_err ;\
	sti	    ;\
    .globl isr##num

ISR_NOERR(0)
ISR_NOERR(1)
ISR(2)
ISR(3)
ISR(4)
ISR(5)
ISR(6)
ISR(7)
ISR(8)
ISR(9)
ISR(10)
ISR(11)
ISR(12)
ISR(13)
ISR(14)
ISR(15)
ISR(16)
ISR(17)
ISR(18)
ISR(19)
ISR(20)
ISR(21)
ISR(22)
ISR(23)
ISR(24)
ISR(25)
ISR(26)
ISR(27)
ISR(28)
ISR(29)
ISR(30)
ISR(31)

isr_keyboard:
	pusha
	call keyboard
	popa
	sti
	iret
	.globl isr_keyboard
isr_err:
	pusha
	call isr_handler_err
	popa
	sti
	iret

isr_common:
	pusha
	call isr_handler
	popa
	sti
	iret

